package com.zhaoxi.project.wms.service.impl;

import java.util.List;

import com.zhaoxi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhaoxi.project.wms.mapper.WmsProductStockLogMapper;
import com.zhaoxi.project.wms.domain.WmsProductStockLog;

/**
 * 出入库记录Service业务层处理
 *
 * @author zhaoxi
 * @date 2023-08-25
 */
@Service
public class WmsProductStockLogServiceImpl {
    @Autowired
    private WmsProductStockLogMapper wmsProductStockLogMapper;

    /**
     * 查询出入库记录
     *
     * @param id 出入库记录主键
     * @return 出入库记录
     */

    public WmsProductStockLog selectWmsProductStockLogById(Long id) {
        return wmsProductStockLogMapper.selectWmsProductStockLogById(id);
    }

    /**
     * 查询出入库记录列表
     *
     * @param wmsProductStockLog 出入库记录
     * @return 出入库记录
     */

    public List<WmsProductStockLog> selectWmsProductStockLogList(WmsProductStockLog wmsProductStockLog) {
        return wmsProductStockLogMapper.selectWmsProductStockLogList(wmsProductStockLog);
    }

    /**
     * 新增出入库记录
     *
     * @param wmsProductStockLog 出入库记录
     * @return 结果
     */

    public int insertWmsProductStockLog(WmsProductStockLog wmsProductStockLog) {
        wmsProductStockLog.setCreateTime(DateUtils.getNowDate());
        return wmsProductStockLogMapper.insertWmsProductStockLog(wmsProductStockLog);
    }

}
